import Vue from 'vue'
import Router from 'vue-router'
import {routers} from './routers'

Vue.use(Router)

export const router = new Router({
  mode: 'history',
  routes: routers
})

router.afterEach(to => {
  document.title = to.matched[to.matched.length - 1].meta.title
})
